package com.iss.card.view.model;

import java.io.Serializable;

import android.util.Log;

import com.iss.card.webservice.BaseModel;

public class MycardDetailModel extends BaseModel implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8178830776878339263L;

	
	
	private String cardPicUrl;
	private String cardOwner;
	private String cardIssuer;
	private String remainPoints;
	private String remainValue;
	private String discount;
	private String remainNumber;
	private String cardRuleDescription;
	
	private static final String CARD_PIC_RUL = "cardPicUrl";
	private static final String CARD_OWNER = "cardOwner";
	private static final String CARD_ISSUER = "cardIssuer";
	private static final String REMAIN_POINTS = "remainPoints";
	private static final String REMAIN_VALUE = "remainValue";
	private static final String DISCOUNT = "discount";
	private static final String REMAIN_NUMBER = "remainNumber";
	private static final String CARD_DISCRUPTION = "cardRuleDescription";
	
	@Override
	public void addValues(String tempString, String valueString,
			BaseModel baseMode) {
		
		if(tempString== CARD_PIC_RUL){
			 setCardPicUrl(valueString);
		}else if(tempString== CARD_OWNER){
			 setCardOwner(valueString);
		}else if(tempString== CARD_ISSUER){
			 setCardIssuer(valueString);
		}else if(tempString== REMAIN_POINTS){
			 setRemainPoints(valueString);
		}else if(tempString== REMAIN_VALUE){
			 setRemainValue(valueString);
		}else if(tempString== DISCOUNT){
			 setDiscount(valueString);
		}else if(tempString== REMAIN_NUMBER){
			 setRemainNumber(valueString);
		}else if(tempString== CARD_DISCRUPTION){
			 setCardRuleDescription(valueString);
		}
		
		baseMode = this;
	}

	public String getCardPicUrl(){
		return cardPicUrl;
	}
	public String getcardOwner(){
		return cardOwner;
	}
	public String getcardIssuer(){
		return cardIssuer;
	}
	public String getRemainPoints(){
		return remainPoints;
	}
	public String getRemainValue(){
		return remainValue;
	}
	public String getDiscount(){
		return discount;
	}
	public String geTremainNumber(){
		return remainNumber;
	}
	public String getCardRuleDescription(){
		return cardRuleDescription;
	}
	public void setCardPicUrl(String cardPicUrl){
		this.cardPicUrl = cardPicUrl;
	}
	public void setCardOwner(String cardOwner){
		this.cardOwner = cardOwner;
	}
	public void setCardIssuer(String cardIssuer){
		this.cardIssuer = cardIssuer;
	}
	public void setRemainPoints(String remainPoints){
		this.remainPoints = remainPoints;
	}
	public void setRemainValue(String remainValue){
		this.remainValue =remainValue; 
	}
	public void setDiscount(String discount){
		this.discount = discount;
	}
	public void setRemainNumber(String remainNumber){
		this.remainNumber = remainNumber;
	}
	public void setCardRuleDescription(String cardRuleDescription){
		this.cardRuleDescription = cardRuleDescription;
	}
	public String getDisplayedDiscount() {
		return String.valueOf(Float.valueOf(discount) * 10);
	}
}
